<!DOCTYPE html>
<html>
<head>
	<title>理财</title>
	<meta charset="utf-8">
	<meta name ="viewport" content ="initial-scale=1.0,maximum-scale=1,user-scalable=no">
	<meta content="yes" name="apple-mobile-web-app-capable">
	<meta content="telephone=no" name="format-detection">
	<link rel="stylesheet" type="text/css" href="/resource/web/css/reset.css">
	<link rel="stylesheet" type="text/css" href="/resource/web/css/flex.css">
    <link rel="stylesheet" type="text/css" href="/resource/web/css/dropload.css">
	<link rel="stylesheet" type="text/css" href="/resource/web/css/finacing.css">
	<script type="text/javascript" src="/resource/web/js/flexible.js"></script>
    <script type="text/javascript" src="/resource/web/js/jquery-1.11.1.min.js"></script>

</head>
<body>
    <div class="fin-lunbo">
        @foreach($banner as $banner1)
        <img src="{{$banner1->img_url}}">
            @endforeach
    </div>
    <div class="notify">
        <!-- 消息通知 -->
    </div>
    <div class="mod-fin content">
        <div class="lists"></div>
        {{--@foreach($info as $info1)--}}
        {{--<a href="/Web/ft/{{$info1->auto_id}}.html">--}}
            {{--<div class="fin-target">--}}
                {{--<p class="biaoti">{{$info1->title}}</p>--}}
                {{--<ul class="fnt-tit tcf-flex tcf-justify-justify">--}}
                    {{--<li class="">预期年化收益</li>--}}
                    {{--<li class="">投资期限</li>--}}
                    {{--<li class="tcf-items2">剩余<span>{{$info1->balance_amount}}</span>元</li>--}}
                {{--</ul>--}}
                {{--<ul class="fnt-num tcf-flex tcf-justify-justify tcf-align-items-end">--}}
                    {{--<li class="fn-1"><span>{{$info1->rate_loaner}}</span>%</li>--}}
                    {{--<li class="fn-2"><span>{{$info1->deadline}}</span>天</li>--}}
                    {{--@if($info1->status=='RELEASE')--}}
                        {{--<li class="fn-3 tcf-items1"><span class="fn-buy-btn fn-ove-btn">即将开始</span></li>--}}
                    {{--@elseif($info1->status=='COLLECTING')--}}
                        {{--<li class="fn-3 tcf-items1"><span class="fn-buy-btn" onClick="location.href='/Web/ft/{{$info1->auto_id}}.html'">抢购</span></li>--}}
                    {{--@else--}}
                            {{--<li class="fn-3 tcf-items1"><span class="fn-buy-btn fn-str-btn" onClick="location.href='/Web/ft/{{$info1->auto_id}}.html'">已抢光</span></li>--}}
                    {{--@endif--}}
                {{--</ul>--}}
            {{--</div>--}}
        {{--</a>--}}
        {{--@endforeach--}}
    </div>
    <div class="mod-footer">
        <ul class="footer tcf-flex tcf-justify-center">
            <a href="/Web/index"><li class="">
                    <img src="/resource/web/img/home/hm-cpicgray1.png">
                    <p>首页</p>
                </li></a>
            <a href="/Web/financing_list.html"><li class="ftred">
                    <img src="/resource/web/img/home/hm-lpicgray1.png">
                    <p>理财</p>
                </li></a>
            <a href="/Web/user_accounts"><li class="">
                    <img src="/resource/web/img/home/hm-rpic1.png">
                    <p>我的</p>
                </li></a>
        </ul>
    </div>

</body>
<script src="/resource/web/js/dropload.min.js"></script>
<script type="text/javascript">
    $("body").css("background","#f2f2f2");

    $(function(){
        // 页数
        var page = 0;
        // 每页展示5个
        //var size = 10;
        // dropload
        $('.content').dropload({
            scrollArea : window,
            loadDownFn : function(me){
                page++;
            var result = '';
            $.ajax({
                type: 'GET',
                processData: false,
                url: '/Web/financing_list1?page='+page,
                dataType: 'json',
                success: function(data){
                    var arrLen = data.data.info.length;
                    var arrlist = data.data.info;
                    //console.log(arrLen);
                    //console.log(arrlist);
                    if(arrLen > 0){
                        for(var i=0; i<arrLen; i++){
                            //console.log( arrlist[i] );
                            if ( arrlist[i].balance_amount == "0" ){
                                result +=   '<a class="item opacity" href="/Web/ft/'+arrlist[i].auto_id+'.html">'
                                        +'<div class="fin-target">'
                                        +'<p class="biaoti">'+arrlist[i].title+'</p>'
                                        +'<ul class="fnt-tit tcf-flex tcf-justify-justify">'
                                        +'<li class="">预期年化收益</li>'
                                        +'<li class="">投资期限</li>'
                                        +'<li class="titem">已满标</ul>'
                                        +'<ul class="fnt-num tcf-flex tcf-justify-justify tcf-align-items-end">'
                                        +'<li class="fn-1"><span>'+arrlist[i].rate_loaner+'</span>%</li>'
                                        +'<li class="fn-2"><span>'+arrlist[i].deadline+'</span>天</li>'
                                        +'<li class="fn-3"><span class="fn-buy-btn fn-str-btn" onClick="location.href="/Web/ft/'+arrlist[i].auto_id+'.html"">已抢光</span></li></ul></div></a>'
                            }else if ( arrlist[i].status == "FULLSCALE" ){
                                result +=   '<a class="item opacity" href="/Web/ft/'+arrlist[i].auto_id+'.html">'
                                        +'<div class="fin-target">'
                                        +'<p class="biaoti">'+arrlist[i].title+'</p>'
                                        +'<ul class="fnt-tit tcf-flex tcf-justify-justify">'
                                        +'<li class="">预期年化收益</li>'
                                        +'<li class="">投资期限</li>'
                                        +'<li class="titem">剩余<span>'+arrlist[i].balance_amount+'</span>元</li></ul>'
                                        +'<ul class="fnt-num tcf-flex tcf-justify-justify tcf-align-items-end">'
                                        +'<li class="fn-1"><span>'+arrlist[i].rate_loaner+'</span>%</li>'
                                        +'<li class="fn-2"><span>'+arrlist[i].deadline+'</span>天</li>'
                                        +'<li class="fn-3"><span class="fn-buy-btn fn-str-btn" onClick="location.href="/Web/ft/'+arrlist[i].auto_id+'.html"">已抢光</span></li></ul></div></a>'
                            }else if ( arrlist[i].status == "AUDIT" ) {
                                result +=   '<a class="item opacity" href="/Web/ft/'+arrlist[i].auto_id+'.html">'
                                        +'<div class="fin-target">'
                                        +'<p class="biaoti">'+arrlist[i].title+'</p>'
                                        +'<ul class="fnt-tit tcf-flex tcf-justify-justify">'
                                        +'<li class="">预期年化收益</li>'
                                        +'<li class="">投资期限</li>'
                                        +'<li class="titem">剩余<span>'+arrlist[i].balance_amount+'</span>元</li></ul>'
                                        +'<ul class="fnt-num tcf-flex tcf-justify-justify tcf-align-items-end">'
                                        +'<li class="fn-1"><span>'+arrlist[i].rate_loaner+'</span>%</li>'
                                        +'<li class="fn-2"><span>'+arrlist[i].deadline+'</span>天</li>'
                                        +'<li class="fn-3"><span class="fn-buy-btn  fn-ove-btn" onClick="location.href="/Web/ft/'+arrlist[i].auto_id+'.html"">即将开始</span></li></ul></div></a>'
                            }else {
                                result +=   '<a class="item opacity" href="/Web/ft/'+arrlist[i].auto_id+'.html">'
                                        +'<div class="fin-target">'
                                        +'<p class="biaoti">'+arrlist[i].title+'</p>'
                                        +'<ul class="fnt-tit tcf-flex tcf-justify-justify">'
                                        +'<li class="">预期年化收益</li>'
                                        +'<li class="">投资期限</li>'
                                        +'<li class="titem">剩余<span>'+arrlist[i].balance_amount+'</span>元</li></ul>'
                                        +'<ul class="fnt-num tcf-flex tcf-justify-justify tcf-align-items-end">'
                                        +'<li class="fn-1"><span>'+arrlist[i].rate_loaner+'</span>%</li>'
                                        +'<li class="fn-2"><span>'+arrlist[i].deadline+'</span>天</li>'
                                        +'<li class="fn-3"><span class="fn-buy-btn" onClick="location.href="/Web/ft/'+arrlist[i].auto_id+'.html"">抢购</span></li></ul></div></a>'
                            }
                        }
                        // 如果没有数据
                    }else{
                        // 锁定
                        me.lock();
                        // 无数据
                        me.noData();
                    }
                    $('.lists').append(result);
                    me.resetload();
                    // 为了测试，延迟1秒加载
                    /*setTimeout(function(){
                        // 插入数据到页面，放到最后面
                        $('.lists').append(result);
                        // 每次数据插入，必须重置
                        me.resetload();
                    },1000);*/
                },
                error: function(xhr, type){
                    console.log('Ajax error!');
                    // 即使加载出错，也得重置
                    me.resetload();
                }
            });
            }
        });
    });
    var titspa = $(".titem").html();
    console.log(titspa);
</script>
</html>